package com.aop;

public class Instrumentailst implements Performer {
    /**
     * 歌唱家类
     */
    private  String song;
    private  Instrument instrument;

    public void perform() {
        System.out.println("Playing"+song+":");
        instrument.play();
    }

    public String getSong() {
        return song;
    }

    public void setSong(String song) {
        this.song = song;
    }

    public Instrument getInstrument() {
        return instrument;
    }

    public void setInstrument(Instrument instrument) {//注入乐器
        this.instrument = instrument;
    }

    public  Instrumentailst(){

    }
}
